﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.ZY
{
    class Class15
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.Period > 2)
            {
                da.Value = ppa.Amount * 0.1;
            }


        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                if (ppa.Age < 18)
                {
                    da.Value = ppa.Amount;
                }
                else
                {
                    da.Value = ppa.Amount * 1.05;
                }

                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.InsurantStates.Contains("全残"))
            {
                if (ppa.Age < 18)
                {
                    da.Value = ppa.Amount;
                }
                else
                {
                    da.Value = ppa.Amount * 1.05;
                }

                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.IsLastPeriod)
            {
                da.Value = ppa.TotalFee;
                ppa.IsCurrentFinish = true;
            }
        }
    }
}
